using System.Collections.Generic;

namespace ThingsGateway.Foundation
{
    /// <summary>
    /// 服务描述类集合接口,指定注册具体方法。
    /// </summary>
    public interface IContainer :
        IContainerProvider, IEnumerable<ServiceDescriptor>
    {
        /// <summary>
        /// 注册类型描述。
        /// </summary>
        /// <param name="key"></param>
        /// <param name="descriptor"></param>
        void Register(ServiceDescriptor descriptor, string key = "");

        /// <summary>
        /// 移除类型描述。
        /// </summary>
        /// <param name="descriptor"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        void Unregister(ServiceDescriptor descriptor, string key = "");

    }
}
